import Taro, { Component } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'
import './footer.less'

class Footer extends Component {
    constructor(props) {
        super(props)
        this.state = {
            imgUrl: ''
        }
    }
    componentWillMount() { }
    componentDidMount() {
        let imgUrl = Taro.getStorageSync('logo')
        this.setState({ imgUrl })
    }
    render() {
        let { imgUrl } = this.state
        return (
            <View className='footer-wrapper'>
                {/* <Image mode='widthFix' className='logo' src={this.state.imgUrl} /> */}
                <Image mode='widthFix' className='logo' src={`${imgUrl || 'https://file.open.banchengyun.com/2019/04/01/155410696356817.png'}`} />
                <View className='footerCon'>
                    <Image mode='widthFix' src='https://www.banchengyun.com/wechat/static/image/footer_logo.png' className='bc-img' />
                    <View className='text'>半城云提供计算服务</View>
                </View>
            </View>
        )
    }
}

export default Footer
